import type { ENavigation01IconType, Navigation01Item } from '@/api/designer/model'

export interface OpenData {
  icon: Pick<Navigation01Item, 'id' | 'icon' | 'iconColor' | 'iconUseThemeColor'>
  iconType: ENavigation01IconType
}
interface OpenCallbackCanceledMeta {
  applied: false
  value: null
}
interface OpenCallbackAppliedMeta {
  applied: true
  value: OpenData
}
export type OpenCallbackMeta = OpenCallbackCanceledMeta | OpenCallbackAppliedMeta
export type OpenCallback = (meta: OpenCallbackMeta) => void
export interface Exposed {
  open: (data: OpenData, callback: OpenCallback) => Promise<void>
}
